import { Component, OnInit } from '@angular/core';
import {MyHttpService} from '../../../service/http/my-http.service';

@Component({
  selector: 'app-test2',
  templateUrl: './test2.component.html',
  styleUrls: ['./test2.component.css']
})
export class Test2Component implements OnInit {

  constructor(private http: MyHttpService) { }
  data: any;
  form: any = {
    name: 'xwy',
    pass: '1231412'
  };
  ngOnInit() {
    this.http.saveUrl(this.form).subscribe((data) => {
      this.data = data;
    });
  }

}
